# eric7.WebBrowser.SearchWidget

Module implementing the search bar for the web browser.

### Global Attributes

None

### Classes

SearchWidget | Class implementing the search bar for the web browser.

### Functions

None

## SearchWidget

Class implementing the search bar for the web browser.

### Derived from

QWidget, Ui_SearchWidget

### Class Attributes

None

### Class Methods

None

### Methods

SearchWidget | Constructor
__findByReturnPressed | Private slot to handle the returnPressed signal of the findtext combobox.
__findNextPrev | Private slot to find the next occurrence of text.
__findNextPrevCallback | Private method to process the result of the last search.
__resetSearch | Private method to reset the last search.
__searchTextEdited | Private slot to perform an incremental search.
__setFindtextComboBackground | Private slot to change the findtext combo background to indicate errors.
findNext | Public slot to find the next occurrence.
findPrevious | Public slot to find the previous occurrence.
keyPressEvent | Protected slot to handle key press events.
on_closeButton_clicked | Private slot to close the widget.
on_findNextButton_clicked | Private slot to find the next occurrence.
on_findPrevButton_clicked | Private slot to find the previous occurrence.
on_findtextCombo_editTextChanged | Private slot to enable/disable the find buttons.
showFind | Public method to display this dialog.

### Static Methods

None

#### SearchWidget (Constructor)

SearchWidget(mainWindow, parent=None)

Constructor

mainWindow (QMainWindow)
  reference to the main window
parent (QWidget)
  parent widget of this dialog

#### SearchWidget.__findByReturnPressed

__findByReturnPressed()

Private slot to handle the returnPressed signal of the findtext combobox.

#### SearchWidget.__findNextPrev

__findNextPrev()

Private slot to find the next occurrence of text.

#### SearchWidget.__findNextPrevCallback

__findNextPrevCallback(result)

Private method to process the result of the last search.

result (QWebEngineFindTextResult)
  reference to the search result

#### SearchWidget.__resetSearch

__resetSearch()

Private method to reset the last search.

#### SearchWidget.__searchTextEdited

__searchTextEdited(txt)

Private slot to perform an incremental search.

txt (str)
  current text of the search combos line edit (unused)

#### SearchWidget.__setFindtextComboBackground

__setFindtextComboBackground(error)

Private slot to change the findtext combo background to indicate errors.

error (bool)
  flag indicating an error condition

#### SearchWidget.findNext

findNext()

Public slot to find the next occurrence.

#### SearchWidget.findPrevious

findPrevious()

Public slot to find the previous occurrence.

#### SearchWidget.keyPressEvent

keyPressEvent(event)

Protected slot to handle key press events.

event (QKeyEvent)
  reference to the key press event

#### SearchWidget.on_closeButton_clicked

on_closeButton_clicked()

Private slot to close the widget.

#### SearchWidget.on_findNextButton_clicked

on_findNextButton_clicked()

Private slot to find the next occurrence.

#### SearchWidget.on_findPrevButton_clicked

on_findPrevButton_clicked()

Private slot to find the previous occurrence.

#### SearchWidget.on_findtextCombo_editTextChanged

on_findtextCombo_editTextChanged(txt)

Private slot to enable/disable the find buttons.

txt (str)
  text of the combobox

#### SearchWidget.showFind

showFind()

Public method to display this dialog.

Up